<template>
  <div class="inform">
    <HeaderTitle title="通知" />
    <Nmusic title="暂时还没收到通知" />
    <div class="content">
      <div class="more" @click="getMsgNotices" v-if="more">加载更多</div>
    </div>
  </div>
</template>

<script>
import Nmusic from "@/components/nMusic";
import HeaderTitle from "./HeaderTitle";
import {msgNotices} from '@/api'
export default {
  name: "inform",
  components: {
    Nmusic,
    HeaderTitle,
  },
  data() {
    return {
      more: false,
      notices: [],
    };
  },
  created() {
    this.init();
  },
  methods: {
    init() {
      this.getMsgNotices()
    },
    getMsgNotices() {
      msgNotices({
        limit:30,
      }).then(data=>{
        console.log(data,"通知 -- 通知");
        this.notices = data.notices
        this.more = data.more
      })
    },
  },
};
</script>

<style lang="scss" scoped>
.more{
  text-align: center;
  font-size:12px;
  color:#999;
  cursor: pointer;
}
</style>